<template>
    <component :is="usecomponent[data.type||'bar']" :option="data.option||{}"></component>
</template>
<script setup>
import Bar from './type/bar.vue'
import Pie from './type/pie.vue'
import {defineProps} from 'vue'

defineProps(['data'])
let usecomponent = {
    "bar": Bar,
    "line": Bar,
    "pie": Pie
}
</script>